package com.wwl.io;

import java.io.*;

public class CopyFile5 {
    public static void main(String[] args) {

        try {
            BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream("data/abc.txt")));
            BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("data/abc11.txt")));
            String line = br.readLine();
            while(line!=null){
                bw.write(line);
                bw.newLine();
                line=br.readLine();
            }
            br.close();
            bw.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
